﻿@model IEnumerable<FILSTARTUPS_CMS.Models.UserGrid>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Pagename{
    <h1>
        User <small>Index</small></h1>
}
@if (TempData["message"] != null)
{
    <div class="alert-message success span12" id="tempdata">
        <center>@TempData["message"]</center>
    </div>
}
<div class="row">
    <div class="span4">
        <div id="usernav" class="span3">
            <h2>
                Options</h2>
            <ul>
                <li>@Html.ActionLink("Add User", "Create", "User")</li>
                <li>@Html.ActionLink("Add Role", "Create", "Role")</li>
                <li>@Html.ActionLink("List of Role", "Index", "Role")</li>
            </ul>
        </div>
    </div>
    <!-- SPAN4 -->
    <div class="span10">
        @using (Ajax.BeginForm("SearchUserRole", "User", new AjaxOptions
        {
            UpdateTargetId = "searchuser",
            InsertionMode = InsertionMode.Replace,
            HttpMethod = "GET",

        }, new { @class = "form-stacked" }))
        {
            <fieldset>
                <legend>Filter User</legend>Filter by Role
                @Html.DropDownList("rolename", new SelectList(ViewData["role"] as System.Collections.IEnumerable,
                                                                 "roleidPK", "rolename"))
                <input type="submit" value="Filter" />
            </fieldset>
        }
        <div id="searchuser">
            @Html.Partial("_UserList")
        </div>
    </div>
    <!-- SPAN12 -->
</div>
<!--ROW -->
